package org.example.controller;


import org.example.entity.TbHobby;
import org.example.service.ITbHobbyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhaowenting
 * @since 2024-03-21
 */
@RestController
@RequestMapping("/tb-hobby")
public class TbHobbyController {
    @Autowired
    ITbHobbyService iTbHobbyService;
    @RequestMapping("hobbyList")
    public List<TbHobby> hobbyList(){
        final List<TbHobby> list = iTbHobbyService.list();
        System.out.println("打印爱好列表里的数据：===="+list);
        return list;
    }
}
